<div class="right01"><img src="content/images/04.gif" /> <a href="<?php echo site_url(); ?>/C_Main/index/">主页</a> &gt; <span>基础内容配置</span> &gt; <span>操作基础内容配置</span></div>

<?php
$attributes = array('id' => 'submitform');
echo form_open('basic/C_Basic_Product_Edit/edit_Product', $attributes);
?>
<table class="tables">
    <?PHP
    if (is_array($entity)) {
        foreach ($entity as $entity_item) {
            ?>
            <tr>
                <td style="width:19%">&nbsp;</td>
                <td style="width:12%">名称：</td>
                <td style="width:19%"><input id="pt_name" name="pt_name" type="text" value="<?PHP echo $entity_item['pt_name']; ?>"/><span style=" color: red">*</span></td>
                <td style="width:12%">单位：</td>
                <td style="width:19%"><input id="pt_units" name="pt_units" type="text" value="<?PHP echo $entity_item['pt_units']; ?>"/><span style=" color: red">*</span></td>
                <td style="width:19%">&nbsp;</td>
            </tr>
            <input name="pt_id" type="hidden" value="<?PHP echo $entity_item['pt_id']; ?>"/>
            <?PHP
        }
    }
    ?>
</table>
<div style="margin-top: 20%; margin-left: 35%;">
    <input class="button" type="submit"  name="postsubmit" value="提交"/>
    <input class="button" type="button" name="resetbtn" onClick="resetButton()" value="返回"/>
</div>
<? echo form_close(); ?>
<script type="text/javascript">
    $("#submitform").submit(function(e){
        if ($("#pt_name").val()=="" || $("#pt_units").val()=="") {
            $.prompt("<span style='color:#FF0000'>请确认信息填写完整！</span>", {
                title: "提示",
                buttons: { "确定": true},
                timeout:5000
            });
            return false;
        }
    })
    //返回
    function resetButton(){
        window.location.href="<?php echo site_url(); ?>/basic/C_Basic_Product_List/";
    }
</script>